package com.sunwayworld.basemodule.rm.train.question.resource;

import java.util.ArrayList;

import com.sunwayworld.basemodule.rm.train.question.bean.LimsCoreQuestionBean;
import com.sunwayworld.basemodule.rm.train.question.bean.LimsCoreQuestionOptBean;
import com.sunwayworld.basemodule.rm.train.support.constant.LimsTrainPathConstant;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;


import com.sunwayworld.framework.data.page.Pagination;
import com.sunwayworld.framework.restful.data.RestJsonWrapperBean;
import com.sunwayworld.framework.support.activatable.resource.GenericActivatableCloudResource;
import com.sunwayworld.framework.support.base.resource.GenericCloudResource;
import com.sunwayworld.framework.support.suspendable.resource.GenericSuspendableCloudResource;

@RequestMapping(LimsTrainPathConstant.CORE_QUESTION_PATH)
public interface LimsCoreQuestionResource extends GenericCloudResource<LimsCoreQuestionBean, Long>,
                                              GenericActivatableCloudResource<LimsCoreQuestionBean, Long>,
                                              GenericSuspendableCloudResource<LimsCoreQuestionBean, Long> {

    @RequestMapping(value = "/{id}/opts", method = RequestMethod.POST)
    void insertOpt(@PathVariable Long id, RestJsonWrapperBean wrapper);

    @RequestMapping(value = "/opts", method = RequestMethod.DELETE)
    void deleteOpt(RestJsonWrapperBean wrapper);
    
    @RequestMapping(value = "/action/clone", method = RequestMethod.PUT)
    ArrayList<Long> clone(RestJsonWrapperBean wrapper);
    
    @RequestMapping(value = "/{id}/opts/queries", method = RequestMethod.POST)
    Pagination<LimsCoreQuestionOptBean> selectQuestionOptPaginationByQuestionId(@PathVariable Long id, RestJsonWrapperBean wrapper);

}